package com.example.smartcanteen.controller;

import com.example.smartcanteen.model.Assess;
import com.example.smartcanteen.service.AssessService;
import com.example.smartcanteen.utils.ResponseMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/assess")
@CrossOrigin
public class AssessController {
    @Autowired
    private AssessService assessService;


    //所需数据：int orderID；int goodsID；double score；String：comment；
    @PostMapping("/create")
    ResponseMessage create(Assess assess) {


        return assessService.create(assess);
    }
}
